{include file="public/header" /}
<body>
<div class="x-body">
    <form action="{:url('save')}" class="layui-form" id="form">
        {include file="public/arguments" /}
        {if $info}
        <input type="hidden" name="id" value="{$info.id}"/>
        {/if}
        <div class="layui-form-item">
            <label class="layui-form-label">用户名 </label>
            <div class="layui-input-inline">
                <input type="text" name="admin_name" lay-verify="required" lay-reqtext="请输入用户名" placeholder="请输入用户名"
                       value="{$info?$info.admin_name:''}" class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">手机号 </label>
            <div class="layui-input-inline">
                <input type="text" name="mobile" placeholder="请输入手机号"
                       value="{$info?$info.mobile:''}" class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">角色 </label>
            <div class="layui-input-inline">
                <select name="role_id" lay-verify="required" lay-reqtext="请选择角色">
                    {volist name="role_list" id="v"}
                    <option value="{$v.id}" {if $info && $v.id==$info.role_id}selected{/if}>{$v.title}</option>
                    {/volist}
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">登录密码 </label>
            <div class="layui-input-inline">
                <input type="password" name="password" placeholder="请输入登录密码"
                       value="{$info?'':'111111'}" class="layui-input" />
            </div>
            <div class="layui-form-mid layui-word-aux">默认密码：111111</div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">备注 </label>
            <div class="layui-input-inline">
                <input type="text" name="comment" placeholder="请输入备注"
                       value="{$info?$info.comment:''}" class="layui-input" />
            </div>
        </div>
        {include file="public/submit" /}
    </form>
</div>
</body>
{include file="public/footer" /}
</html>